<?
class Wing_model extends CI_Model {

    function __construct()
    {
        parent::__construct();
    }

    function getList(){
	
		$query = $this->db->query('SELECT wing_id,wing_alias,wing_name from  bkw_wings where rec_status=1');
		return $query->result();

	}
	
	 function getWingContent($colName,$wingAlias){
	
		$query = $this->db->query("SELECT $colName from  bkw_wings where wing_alias='".$wingAlias."' and rec_status=1");
		$result= @array_pop($query->result());
		
		return $result->$colName;
	}
	
	  function getWing($wingAlias){
	
		$query = $this->db->query("SELECT wing_id,wing_alias,wing_name,wing_desc from  bkw_wings where wing_alias='".$wingAlias."' and rec_status=1");
		return @array_pop($query->result());

	}
}